home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tcoop.arc / TCOOP2.ARC / TFSOTST2.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-26  |  1.0 KB  |  37 lines

  1. // Displays multiple windows
  2.  
  3. #include <conio.h>
  4. #include "tfsounit.h"
  5. #include "keybrd.h"
  6.  
  7. main()
  8. {
  9.   clrscr();
  10.   Tfso T1(0x31, Swappable+Closeable, RedColors);
  11.   T1.SetSize(40, 15);
  12.   T1.SetLocn(5, 5);
  13.   T1.GetImage(T1.Overall);     // Save the image behind the window
  14.   T1.DrawFrame(0,0);           // Draw the window
  15.   T1.Clear(177, 0);
  16.   bioskey(0);
  17.   Tfso T2(0x21, Swappable+Closeable, CyanColors);
  18.   T2.SetSize(30, 10);
  19.   T2.SetLocn(47, 10);
  20.   T2.GetImage(T2.Overall);      // Save the image behind window 2
  21.   T2.DrawFrame(0,0);
  22.   T2.Clear(177, 0);
  23.  
  24.   T1.HzWrt(0, 1, "Window 1", 0); // Display message in window 1 
  25.   bioskey(0);
  26.   T2.HzWrt(0, 1, "Window 2", 0); // Display message in window 2 
  27.   bioskey(0);
  28.   T1.Swap(T1.Overall, PutIm);    // Hide window 1
  29.   bioskey(0);
  30.   T2.Swap(T2.Overall, PutIm);    // Hide window 2
  31.   T1.SetLocn(30, 6);             // Move window 1 and re-display
  32.   T1.Swap(T1.Overall, GetIm);
  33.   bioskey(0);
  34.   T2.Swap(T2.Overall, GetIm);    // Put window 2 on top
  35.   bioskey(0);
  36. }
  37.